package com.campus.commons.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Date;

//OSS服务器 实体类
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "CloudFile对象", description = "教室表")
@TableName(excludeProperty = {"deName"})


public class CloudFile {
    //部门名称
    private String deName;

    @ApiModelProperty(value = "文件Id")
    @TableField("fileId")
    private Integer fileId;
    @ApiModelProperty(value = "文件名称")
    @TableField("fileName")
    private String fileName;
    @ApiModelProperty(value = "文件URL路径")
    @TableField("filePath")
    private String filePath;
    @ApiModelProperty(value = "文件大小")
    @TableField("fileSize")
    private long fileSize;
    @ApiModelProperty(value = "部门Id，哪个部门上传的")
    @TableField("filedeId")
    private Integer filedeId;
    @ApiModelProperty(value = "文件更新时间")
    @TableField("upTime")
    private Date upTime;
    @ApiModelProperty(value = "oss的文件路径")
    @TableField("fileRelativePath")
    private String fileRelativePath;

    public CloudFile(String fileName, String filePath, long fileSize, Integer filedeId, String fileRelativePath) {
        this.fileName = fileName;
        this.filePath = filePath;
        this.fileSize = fileSize;
        this.filedeId = filedeId;
        this.fileRelativePath = fileRelativePath;
    }

    public CloudFile(String deName, String fileName, String filePath, long fileSize, Integer filedeId, String fileRelativePath) {
        this.deName = deName;
        this.fileName = fileName;
        this.filePath = filePath;
        this.fileSize = fileSize;
        this.filedeId = filedeId;
        this.fileRelativePath = fileRelativePath;
    }
}
